package com.qf;

import com.qf.model.Stu;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;


public class Demo01 {
    @Test
    public void test(){
        List<Stu> list = new ArrayList<>();
        Stu stu = new Stu("111",11,22);
        Stu stu2 = new Stu("222",11,23);
        Stu stu3 = new Stu("333",12,22);
        Stu stu4 = new Stu("444",13,24);
        Stu stu5 = new Stu("555",15,22);
        Stu stu6 = new Stu("666",12,24);
        Stu stu7 = new Stu("777",13,25);
        Stu stu8 = new Stu("888",14,23);
        Stu stu9 = new Stu("222",15,25);

        List<Stu> stus = Stream.of(stu, stu2, stu3, stu4,stu5,stu6,stu7,stu8,stu9).collect(Collectors.toList());
        System.out.println(stus);

    }

}
